<?php
/**************************************************************************
 * Naanal PHP Framework, Simple, Efficient and Developer Friendly
 * Ver 3.0, Copyright (C) <2010>  <Tamil Amuthan. R>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ************************************************************************/
class ClsNaanaladmin extends ClsNaanalController
{
   /**
         * CONSTRUCT 
         * @package naanal
         */        
    public function __construct()
    {
       parent::__construct();
    } 
    /**
    * getRedirect
    * @package naanal
    * @return string
    */
    public function getRedirect()
    {
          return $this->redirect;
    }
    private function getConfigContent()
    {
      $content="";
      return $content;
    }
    private function getControllerContent()
    {
      $content="";
      return $content;
    }
    private function getWrapperContent()
    {
      $content="";
      return $content;
    }
    public function generate()
    {
        $objRequest=ClsNaanalRequest::getInstance();
        $switch = $objRequest->getData("switch");
        if($switch=="appconfig")
        {
            include_once(dirname(__FILE__)."/include/ClsNaanalapp.php");
            
        }
        else
        {
            include_once(dirname(__FILE__)."/include/ClsNaanalmod.php");
            $modname = $objRequest->getData("module");
            $database = $objRequest->getData("database");
            if($database=="true")
            {
                $database=true;
            }
            else if($database=="false")
            {
                $database=false;
            }
            $table=  $objRequest->getData("table");
            if($table=="true")
            {
                $table=true;
            }
            else if($table=="false")
            {
                $table=false;
            }
            $objModule=new ClsNaanalmod($modname,$database,$table);
            echo $objModule->render();
        }
    }
}
?>